{% extends '../../../layouts/skins/v2/layout.volt' %}
{% block content %}
<div ng-controller="categoryController" class="category">
    <div class="containers ">
        <div class="main">
            <div class="info">
                <div class="filter-tabs">
                    <ul>
                        <li {{helper.getActiveTabSearch(param,'phim')}} ><a href="{{url('video/search/phim?key='~key)}}">PHIM</a></li>
                        <li {{helper.getActiveTabSearch(param,'clip')}}><a href="{{url('video/search/clip?key='~key)}}">CLIP</a></li>
                        <li {{helper.getActiveTabSearch(param,'tvshow')}}><a href="{{url('video/search/tvshow?key='~key)}}">TV SHOW</a></li>
                    </ul>
                </div>
                <h4 class="blockTitle">
                    <span>{{helper.resultVideo(num,key)}}</span>
                </h4>
                <div class="category-content tag">
                    <div class="group">
                        {% if num > 0 %}
                        {% for video in videos %}
                        <div class="block-base movie" style="">
                            <a href="{{url('video/detail/'~video.getId())}}" target="_blank">
                                {% if(video.imageLink.getFirst()) %}
                                {{ image('/public/files/' ~ video.imageLink.getFirst().images.getImagePath() , 'width' : '100%','height':'250') }}
                                {% else %}
                                {{ image('/public/files/default.jpg'  , 'width' : '100%','height':'250') }}
                                {% endif %}
                            </a>
                            <div class="movie-info rate">
                                <div class="icon imdb">
                                    <strong>5.4</strong>
                                    <small>IMDb</small>
                                </div>
                                <a class="main-cta" href="{{url('video/detail/'~video.getId())}}">CHI TIẾT</a>
                            </div>

                            <a class="title" href="#" target="_blank">{{video.videoDescription.getName()}}</a>
                        </div>
                        {% endfor %}
                        {% else %}
                        <div class="result"></div>
                        {% endif %}
                    </div>
                </div>
                <div class="paginator">
                      {% if videos.haveToPaginate() %}
                          {# Render the navigation #}
                          {{ videos.getLayout() }}
                      {% endif %}
                </div>

            </div>

        </div>

    </div>
</div>
{% endblock %}